package com.example.springboottx.service;

import com.example.springboottx.bean.Computer;
import com.example.springboottx.mapper.ComputerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class ComputerServiceImpl implements ComputerService{

    @Autowired
    private ComputerMapper computerMapper;

    @Override
    public int insertComputer(Computer computer) {
        return computerMapper.insertComputer(computer);
    }

    @Override
    public Computer selectOneComputer(String name) {
        return computerMapper.selectOneComputer(name);
    }

    @Override
    public long insertComputerTestSelectKey(Computer computer) {
        return computerMapper.insertComputerTestSelectKey(computer);
    }

    @Override
    public Computer findOneBy2Param(String computerName, Integer computerPrice) {
        return computerMapper.findOneBy2Param(computerName,computerPrice);
    }

    @Override
    public List<Computer> selectAllComputer(String keyboard, String mouse) {
        return computerMapper.selectAllComputer(keyboard,mouse);
    }

    @Override
    public Computer findByMap(HashMap<String, String> map) {
        return computerMapper.findByMap(map);
    }


}



